package com.ysd.crm.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ysd.crm.entity.Students;
import com.ysd.crm.entity.seach.StudentsSeach;
import com.ysd.crm.mapper.StudentsMapper;
import com.ysd.crm.service.StudentsService;
@Service
public class StudentsServiceImpl implements StudentsService {

	@Autowired
	private StudentsMapper studentsMapper;
	/**
	 * ytt
	 * 多条件分页查询学生
	 * @param s
	 * @return
	 */
	@Override
	public List<Students> findStuByWhere(StudentsSeach s) {
		// TODO Auto-generated method stub
		return studentsMapper.getStuByWhere(s);
	}

	/**
	 * ytt
	 * 多条件分页查询学生总条数
	 * @param s
	 * @return
	 */
	@Override
	public int findStuCount(StudentsSeach s) {
		// TODO Auto-generated method stub
		return studentsMapper.getStuCount(s);
	}

	@Override
	public int fisertStudens(Students s) {
		// TODO Auto-generated method stub
		return studentsMapper.isertStudens(s);
	}
	/**
	 * 修改 gmw
	 */
	public int updateStu(Students s) {
		// TODO Auto-generated method stub
		return studentsMapper.xiugaiStu(s);
	}
	/**
	 * 删除 gmw
	 */
	@Override
	public int deleteStu(Students s) {
		// TODO Auto-generated method stub
		return studentsMapper.delStu(s);
	}
}
